import { mainStore } from "@/stores/modules/main"

export function usePermissions(pageName: string, handleName: string) {
  const mainstore = mainStore()
  const permissions = mainstore.perm
  const verifyPermission =
    handleName + pageName.slice(0, 1).toLocaleUpperCase() + pageName.slice(1)
  return permissions?.find(item => item === verifyPermission)
}
